﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nancy;
using Nancy.ErrorHandling;

namespace NancyApp
{
    public class TestModule : NancyModule
    {
        public TestModule()
            : base("/needpermit")
        {
            Before += ctx => {
                return null;
            };

            Get["/string/{uid:int}/{name?}"] = x =>
            {
                return "just string" + x.uid;
            };

            Get["/json"] = x =>
            {
                return this.Response.AsJson(new { id = 1, name = "fuck" });
            };
        }
    }

    public class abcdef : IStatusCodeHandler
    {
        public void Handle(HttpStatusCode statusCode, NancyContext context)
        {
            throw new NotImplementedException();
        }

        public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
        {
            throw new NotImplementedException();
        }
    }
}